package cate.game.play.skill.passive.hero;

import cate.game.play.config.PlayCfgArgs;
import cate.game.play.fighter.Fighter;
import cate.game.play.proce.action.ctx.ActionCtx;
import cate.game.play.skill.passive.PassiveHandler;

/**
 * 死亡且未复活，恢复我方全队基于燕窝攻击力250%的生命值
 */
public class 余晖成绮PH extends PassiveHandler {

	private double 恢复系数;

	//恢复系数=25000
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		恢复系数 = args.getWDouble("恢复系数", 0d);
	}

	@Override
	public void onDeadNoRebirth(ActionCtx action) {
		double v = skill.owner.attr.attTotal() * 恢复系数;
		for (Fighter target : skill.owner.getFightTeam().getFightersAlive()) {
			target.attr.passiveHeal(action, skill.owner, v);
		}
	}
}
